﻿@using OpenIdProvider

@{
    ViewData["Title"] = "";
}

@ViewData.HandleErrorMessage()

<div class="explanation">
    <p>
        Send your @Current.SiteName account information to this site?
    </p>
</div>

<div class="login-form">
    <form method="post" action="/affiliate/form/confirm/submit">
        <input type="hidden" id="fkey" name="fkey" value="@Current.XSRFToken.Value" />
        <input type="hidden" name="affId" value="@ViewData["affId"]" />
        <input type="submit" class="affiliate-button" name="accept" value="Login" />
    </form>
</div>

@{
    // If the affiliate has provided a callback, call out to the parent IFrame to let it know we've loaded
    var onLoad = ViewData["OnLoad"];
    
    if(onLoad != null)
    {
        <script type="text/javascript">
            if (parent.postMessage) {
                parent.postMessage('@onLoad', '*');
            }
        </script>
    }
}